//This is Addition of two Matrix

#include<stdio.h>
#include<conio.h>
void main()
{
	int a[10][10], ab[10][10], abc[10][10], i, j, m, n;
	clrscr();

	//Putting Order of Matrix
	printf("\n\n\t\tPlease Enter the Matrix Order: ");
	scanf("%d%d", &m, &n);

	printf("\n\n\t\tPlease Enter the 1st Matrix: ");

	for(i = 0; i < m; i++)
	{
		for(j = 0; j < n; j++)
		{
			scanf("%d", &a[i][j]);
		}
	}

	printf("\n\n\t\tPlease Enter the 2nd Matrix: ");

	for(i = 0; i < m; i++)
	{
		for(j = 0; j < n; j++)
		{
			scanf("%d", &ab[i][j]);
		}
	}
	//Printing 1st Matrix
	printf("\n\n\tThe 1st Matrix is:\n\n");
	for(i = 0; i < m; i++)
	{
		for(j = 0; j < n; j++)
		{
			printf("\t%d", a[i][j]);
		}
		printf("\n");
	}

	//printing 2nd Matrix
	printf("\n\n\tThe 2nd Matrix is:\n\n");

	for(i = 0; i < m; i++)
	{
		for(j = 0; j < n; j++)
		{
			printf("\t%d", ab[i][j]);
		}
		printf("\n");
	}

	//Addition of Two Matrix
	for(i = 0; i < m; i++)
	{
		for(j = 0; j < n; j++)
		{
			abc[i][j] = a[i][j] + ab[i][j];
		}
	}
	//Printing Added of  Two Matrix.
	printf("\n\n\tThe Addition of two Matrix is:\n\n");

	for(i = 0; i < m; i++)
	{
		for(j = 0; j < n; j++)
		{
			printf("\t%d", abc[i][j]);
		}
		printf("\n");
	}

	getch();

}